package com.ticker.national;

import android.os.AsyncTask;

public abstract class BaseAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> {
	
	public OnTaskListener mListener;
	
	public interface OnTaskListener {
		public abstract void onError();
		public abstract void onTerminated();
		public abstract void onCancel();
	}
	
	public BaseAsyncTask(OnTaskListener l) {
		super();
		this.mListener = l;
	}
	
	public BaseAsyncTask() {
		super();
	}


	@Override
	protected Result doInBackground(Params... params) {
		return null;
	}

	@Override
	protected void onPostExecute(Result result) {
		super.onPostExecute(result);
		mListener.onTerminated();
	}
}
